import time
from selenium.webdriver.common.by import By


#支付宝零钱理财
def zfb(driver, mima):
    driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
    driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()
    driver.find_element(By.XPATH,
                             "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()
    time.sleep(1)

    driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/input").send_keys(mima)
    driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
    time.sleep(1)

#期限理财
def qx(driver, mima):
    driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
    driver.find_element(By.XPATH, "/html/body/div/div/aside/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
    driver.find_element(By.XPATH,
                             "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
    time.sleep(1)

    driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/input").send_keys(mima)
    driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
    time.sleep(1)

#基金理财
def jijin(driver, mima):
    driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
    driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
    driver.find_element(By.XPATH,
                             "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
    time.sleep(1)

    driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/input").send_keys(mima)
    driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
    time.sleep(1)